<template>
  <div>
      <p style="font-size:200%">文件审核</p>
    <!-- <iframe
      id="iframe1"
      width="800"
      height="600"
      frameborder="no"
      border="0"
      marginwidth="0"
      marginheight="0"
      scrolling="no"
      allowtransparency="yes"
      :src="'http://view.officeapps.live.com/op/view.aspx?src=' + initdata.contentAddress"
    ></iframe> -->
    <a :href="initdata.contentAddress">下载文件</a>
    <div>
      <div style="margin:5% auto;width:400px;height:200px">
        <b-field label="点编号">
          <b-input v-model="initdata.pointId"></b-input>
        </b-field>
        <b-field label="知识产权所有人">
          <b-input v-model="initdata.uploader"></b-input>
        </b-field>
        <b-field label="知识来源,请填入收款地址，方便收款者收费">
          <b-input v-model="initdata.origin"></b-input>
        </b-field>
        <b-field label="文件创建者">
          <b-input v-model="initdata.creator"></b-input>
        </b-field>
        <b-field label="文件类型" type="is-success">
          <b-select placeholder="选择文件类型" v-model="initdata.type">
            <option value="0">PDF</option>
            <option value="1">Video</option>
          </b-select>
        </b-field>
        <b-field label="内容" type="is-success">
          <b-select placeholder="选择文件内容" v-model="initdata.content">
            <option value="原理">原理</option>
            <option value="实验">实验</option>
            <option value="题库">题库</option>
            <option value="问答">问答</option>
          </b-select>
        </b-field>
        <b-field label="难度" type="is-success">
          <b-select placeholder="选择文件难度" v-model="initdata.degree">
            <option value="初级">初级</option>
            <option value="中级">中级</option>
            <option value="高级">高级</option>
          </b-select>
        </b-field>
        <b-field label="标签" type="is-success">
          <b-select placeholder="选择文件标签" v-model="initdata.tag">
            <option value="案例介绍">案例介绍</option>
            <option value="名人趣事">名人趣事</option>
            <option value="最新进展">最新进展</option>
          </b-select>
        </b-field>
        <b-button @click="Upload()">确认信息</b-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      initdata: "",
    };
  },
  methods: {
    async init() {
      let res = await this.$http.get("api/2backcode/address/findL");
      this.initdata = res.data;
    },
    async Upload(){
        let data=new FormData()
        data.append("addressId",this.initdata.addressId)
        data.append("key","origin")
        data.append("value",this.initdata.origin)
        let res=await this.$http.put("api/2backcode/address/update1",data)
        console.log(res.data)
        alert("审核完成")
    },
  },
  mounted() {
    this.init();
  },
};
</script>

<style></style>
